<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>优菜商城</title>
		<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" />
		<meta content="yes" name="apple-mobile-web-app-capable" />
		<meta content="black" name="apple-mobile-web-app-status-bar-style" />
		<meta content="telephone=no" name="format-detection" />
		<meta name="author" content="@binggan" />
		<link rel="stylesheet" href="css/ydui.css" />
		<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_463779_pkv3jpw5yz1fko6r.css" />
		<link rel="stylesheet" type="text/css" href="css/swiper.min.css" />
		<link rel="stylesheet" type="text/css" href="css/common.css" />
		<script src="js/flexible.js"></script>
	</head>

	<body>
		<section class="g-flexview">
			<header class="m-navbar index-navbar border-bot">
				<a href="#" class="navbar-item back">
					<i class="back-ico"></i>
				</a>
				<div class="navbar-center">
					<span class="navbar-title">申请退款</span>
				</div>
			</header>
			<div class="g-scrollview order-detail-page">
				<!--订单相关信息-->
				<div class="order-lists-item white-bg">
					<a href="detail.html" class="order-item-info border-bot">
						<div class="item-right">
							<div class="thumbnail">
								<img src="images/item_thumbnail.png">
							</div>
							<div class="iten-right-info">
								<p class="item-right-name text-overfow">进口红提(盒装1150g)进口红提(盒装1150g)进口红提(盒装1150g)进口红提(盒装1150g)进口红提(盒装1150g)进口红提(盒装1150g)进口红提(盒装1150g)</p>
								<div class="iten-right-info-bot">
									<p class="price-box">¥<span class="price unit-price">558.36</span></p>
									<p>X<span class="mernum">1</span></p>
								</div>
							</div>
						</div>
					</a>
				</div>

				<div class="address-info-box sep-items">
					<i class="iconfont icon-shouhuodizhi"></i>
					<div class="user-addr-info">
						<div class="user-addr-info-top">
							<p>收货人：张三</p>
							<p>123456789012</p>
						</div>
						<p>收货地址：湖北省武汉市洪山区书城路文秀街</p>
					</div>
				</div>
				<!--订单相关信息end-->

				<div class="white-bg line-nav cell-item botline" id="ref-reason-btn">
					<div class="cell-left">退款原因</div>
					<div class="cell-right"><input type="text" class="reason-input" name="" id="reason-input" placeholder="请选择退款原因" readonly="readonly"><i class="iconfont icon-arrow-right"></i></div>
				</div>
				<div class="infos-bot white-bg">
					<p>退款金额：</p>
					<span class="price">¥80.00</span>
				</div>
				<div class="infos-bot white-bg select-delivery-time sep-items">
					<p>退款说明：</p>
					<input name="remarks" class="delivery-addr refund-notes" rows="1" placeholder="选填" />
				</div>
			</div>
			<!--底部提交按钮-->
			<button type="button" class="button-yellow refund-submit">提交</button>

			<!--退款理由选择-->
			<ul class="m-actionsheet" id="refund-reason">
				<li class="actionsheet-item active">拍错了商品</li>
				<li class="actionsheet-item">重复拍了商品</li>
				<li class="actionsheet-item">其它原因</li>
				<li class="actionsheet-action" id="J_Cancel">确定</li>
			</ul>
			<!--退款理由选择end-->
		</section>
		<script src="js/jquery.min.js"></script>
		<script src="js/ydui.js"></script>
		<script type="text/javascript" src="js/myvalidate.js" ></script>
		<script>
			var $act = $('#refund-reason'),
				$items = $("#refund-reason .actionsheet-item"),
				$reasonBtn = $("#ref-reason-btn");
			$reasonShow = $("#reason-input");
			$reasonBtn.on('click', function() {
				$act.actionSheet('open');
			});
			$('#J_Cancel').on('click', function() {
				$act.actionSheet('close');
			});
			$items.on('click', function() {
				$(this).addClass('active').siblings().removeClass('active');
			})

			/* 时间选择器关闭事件 */
			$act.on('close.ydui.actionsheet', function() {
				var select_time = $('#refund-reason .actionsheet-item.active').text();
				$reasonShow.val(select_time);
			});
			
			//退款提交
			var $submit=$(".refund-submit"),
				$reason=$(".reason-input");
			$submit.on('click',function(){
				var refundNotes=$(".refund-notes").val();//退款说明
				var testReason=myValidate.init($reason,"请选择退款理由");
				if (testReason) {
					console.log(refundNotes);
					YDUI.dialog.loading.open('正在提交申请');
					$.ajax({
						type:"post",
						url:"",
						success:function(){
							YDUI.dialog.loading.close();
							
						},
						error:function(){
							
						}
					});
				}
			});
		</script>
		<script src="js/common.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/cart2.js" type="text/javascript" charset="utf-8"></script>
	</body>

</html>